<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<html lang="en">

<head>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">

<title>TP Final Prog. Avanzada II</title>
<link rel="stylesheet"
	href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<!-- Bootstrap Core CSS -->
<link href="bootstrap/vendor/bootstrap/css/bootstrap.css"
	rel="stylesheet">

<!-- Custom Fonts -->
<link href="https://fonts.googleapis.com/css?family=Lato"
	rel="stylesheet">
<link
	href="https://fonts.googleapis.com/css?family=Catamaran:100,200,300,400,500,600,700,800,900"
	rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Muli"
	rel="stylesheet">

<!-- Plugin CSS -->
<link rel="stylesheet"
	href="bootstrap/vendor/font-awesome/css/font-awesome.css">
<link rel="stylesheet"
	href="bootstrap/vendor/simple-line-icons/css/simple-line-icons.css">

<!-- Theme CSS -->
<link href="bootstrap/css/new-age.css" rel="stylesheet">

</head>

<body id="page-top">

	<c:if test="${not empty MensajeIndice}">

		<%@ include file="/bootstrap/MensajeSuperior.jsp"%>				
   					${MensajeIndice}
 				<%@ include file="/bootstrap/MensajeInferior.jsp"%>

	</c:if>

	<nav id="mainNav" class="navbar navbar-default navbar-fixed-top">
	<div class="container">
		<!-- Brand and toggle get grouped for better mobile display -->
		<div class="navbar-header">
			<button type="button" class="navbar-toggle collapsed"
				data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
				<span class="sr-only">Toggle navigation</span> Menu <i
					class="fa fa-bars"></i>
			</button>
			<a class="navbar-brand page-scroll" href="index.jsp">Index</a>
		</div>

		<!-- Collect the nav links, forms, and other content for toggling -->
		<div class="collapse navbar-collapse"
			id="bs-example-navbar-collapse-1">
			<ul class="nav navbar-nav navbar-right">

				<c:if test="${not empty UsuarioLogeado}">
					<li><a class="page-scroll" href="#indice">Bienvenido
							${UsuarioLogeado.nombre} ${UsuarioLogeado.apellido}</a></li>
					<li style="margin-top: 10px;">
						<form
							action="${pageContext.request.contextPath}/CerrarSessionServlet"
							method="post">

							<input type="submit" value="Cerrar Sesion">




						</form>


					</li>

				</c:if>

				<c:if test="${empty UsuarioLogeado}">
					<li><a class="page-scroll" href="#logearse">Ingrese para
							proceder..</a></li>
				</c:if>


			</ul>
		</div>
		<!-- /.navbar-collapse -->
	</div>
	<!-- /.container-fluid --> </nav>













	<header>
	<div class="container">
		<div class="row">
			<div>
				<div class="header-content">
					<div class="header-content-inner">
						<h1>Trabajo practico: Electronica Don Pepe</h1>
						<a href="#indice" class="btn btn-outline btn-xl page-scroll">Empezar</a>
					</div>
				</div>
			</div>

		</div>
	</div>
	</header>








	<section class="indice" id="indice">
	<div class="cta-content">
		<div class="container">

			<c:if test="${not empty UsuarioLogeado}">

				<h1>Modulos:</h1>
				<br>
				<br>




				<c:if test="${UsuarioLogeado.usuario == 'admin'}">

					<a href="agregarEmpleado.jsp"
						class="btnAdmin btnAdmin-outline btnAdmin-xl page-scroll">Agregar
						Empleado</a>
					<br>
					<br>
					<br>

					<a href="ModificarEmpleadoServlet"
						class="btnAdmin btnAdmin-outline btnAdmin-xl page-scroll">Modificar
						Empleado</a>
					<br>
					<br>
					<br>
					<a href="agregarProducto.jsp"
						class="btnAdmin btnAdmin-outline btnAdmin-xl page-scroll">Agregar
						Producto</a>
					<br>
					<br>
				</c:if>


				<c:if
					test="${UsuarioLogeado.categoria == 'Vendedor'}">



					<a href="AgregarVentaServlet"
						class="btn btn-outline btn-xl page-scroll">Agregar Venta</a>
					<br>
					<br>

					<a href="ConsultarVentasRealizadas"
						class="btn btn-outline btn-xl page-scroll">Consultar Ventas
						Realizadas</a>
					<br>
					<br>

				</c:if>

				<c:if
					test="${UsuarioLogeado.categoria == 'Recursos Humanos'}">
					<a href="ObtenerReportesComisionesPremios"
						class="btnRecursos btnRecursos-outline btnRecursos-xl page-scroll">Obtener
						Reportes de Comisiones y Premios</a>
					<br>
					<br>
					<br>
					<a href="ActualizarPremiosServlet"
						class="btnRecursos btnRecursos-outline btnRecursos-xl page-scroll">Actualizar
						Premios y Comisiones</a>
					<br>
					<br>

				</c:if>
			</c:if>

			<c:if test="${empty UsuarioLogeado}">

				<form action="${pageContext.request.contextPath}/LoginServlet"
					method="post">
					<div id="logearse">

						<h3>Usuario</h3>

						<input type="text" name="inputUsuario"
							placeholder="Ingrese Usuario" pattern=".{2,100}" required
							title="Usuario debe contener de 2 a 100 caracteres."
							maxlength="100" class="inputs">

						<h3>Password</h3>
						<input type="password" name="inputPassword"
							placeholder="Ingrese Password" pattern=".{2,100}" required
							title="Password debe contener de 2 a 100 caracteres."
							maxlength="100" class="inputs"> </br> </br> </br> <input type="submit"
							value="Ingresar">

					</div>
				</form>

			</c:if>

			<c:if test="${empty UsuarioLogeado}">

				<div>
					</br> </br> </br> </br>

					<form
						action="${pageContext.request.contextPath}/RegistrosInicialesServlet"
						method="post">
						<div>
							<input type="submit" value="Cargar Datos Iniciales"
								onclick="return confirm('Seguro?');">

						</div>
					</form>
					<div style="color: white;">
						<p>
							Cuentas: <br> Administrador: admin admin <br> Vendedor:
							vendedor1 vendedor1 <br> Recursos Humanos: recursos1
							recursos1
						</p>
					</div>
				</div>
			</c:if>

		</div>
	</div>
	<div class="overlay"></div>
	</section>




	<footer>
	<div class="container">
		<p>&copy; 2016 F. Leandro - TSSI.</p>
		<ul class="list-inline">
			<li><a href="#">TP</a></li>
			<li><a href="#">Prog.</a></li>
			<li><a href="#">II</a></li>
		</ul>
	</div>
	</footer>



	<!-- Bootstrap Core JavaScript -->
	<script src="bootstrap/vendor/bootstrap/js/bootstrap.min.js"></script>

	<!-- Plugin JavaScript -->
	<script
		src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>

	<!-- Theme JavaScript -->
	<script src="bootstrap/js/new-age.min.js"></script>

</body>

</html>
